Skip to content

Instantly share code, notes, and snippets.

@sunmeat
sunmeat / Program.cs
Last active January 15, 2026 20:46
lazy initialization example C#
using System.Text;
namespace LazyInitializationExample
{
class Program
{
static void Main()
{
Console.OutputEncoding = Encoding.UTF8;
var lazy = new LazyHistory();
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active January 15, 2026 20:43
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@magnetikonline
magnetikonline / README.md
Last active January 15, 2026 20:42
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@tak-dcxi
tak-dcxi / typography.md
Last active January 15, 2026 20:40
タイポグラフィCSS

タイポグラフィ

汎用的な文章の折り返し指定

  • 下のような指定を:rootに指定しておく。
:where(:root) {
  overflow-wrap: anywhere; /* 収まらない場合に折り返す */
  /* word-break: initial; 単語の分割はデフォルトに依存(初期値のため指定しなくて良い) */
@mmozeiko
mmozeiko / gpu_api_matrix.md
Last active January 15, 2026 20:39
GPU API matrix
↓ on → CPU OpenGL OpenGLES D3D9 D3D11 D3D12 Vulkan Metal
OpenGL [llvmpipe][] - [gl4es][] [TitaniumGL][] [d3d12][] [zink][]
OpenGLES [llvmpipe][] [SwiftShader][slegacy] [ANGLE][] - [ANGLE][] [ANGLE][] [d3d12][] [ANGLE][] [zink][] [ANGLE][] [ANGLE][] [MoltenGL][]
D3D9 [SwiftShader][slegacy] [wined3d][] - [D3D9on12][] [DXVK][]
D3D11 [WARP][] [wined3d][]
@kaimi-
kaimi- / gist:6b3c99538dce9e3d29ad647b325007c1
Last active January 15, 2026 20:38
Possible IP Bypass HTTP Headers
CACHE_INFO: 127.0.0.1
CF_CONNECTING_IP: 127.0.0.1
CF-Connecting-IP: 127.0.0.1
CLIENT_IP: 127.0.0.1
Client-IP: 127.0.0.1
COMING_FROM: 127.0.0.1
CONNECT_VIA_IP: 127.0.0.1
FORWARD_FOR: 127.0.0.1
FORWARD-FOR: 127.0.0.1
FORWARDED_FOR_IP: 127.0.0.1
docker

Curso Docker - Guía práctica de uso para desarrolladores

@SvenGDK
SvenGDK / Full-Y2JB-YouTube-Block.md
Last active January 15, 2026 20:37
How to fully block YouTube from being updated on the PS5 when using YT2JB.

Simply modifing appinfo.db will not block YouTube from being updated. As soon as you connect to the internet without setting a DNS it will automatically refresh itself to the correct clean state, the icon also switches back to original. This can result in a softlock where you have to set up everyhting again.

In order to properly block YouTube from being updated, you also need to fully update YouTube's parameters after a new installation.

The param.json file of the YouTube app is actually located at 3 positions when installed :

  • At /system_data/priv/appmeta/PPSA01650/param.json
  • At /user/appmeta/PPSA01650/param.json
  • And also inside /system_data/priv/mms/app.db TABLE: tbl_contentinfo COLUMN: AppInfoJson
http://ec2-34-228-133-172.compute-1.amazonaws.com/file?f=16d0f7dd3bc2a324225218c2f22bbfbde4288ea6781406cee8fe41c5df2879234b42b0eb07e6fe0a15d2f364c56ffd7ca210c6c2e9632190199badf1f3388e4fb0b7280fdf713d93357206ac3dfd4b4fb02f61c84e135b417d118fa9c30d2e99d506b9305cba220db22300a7c23257fc3a639b1c5db3b570fcdcb3689890a85724f47eb851bf0adea99b1e1e4db71c50c85d0dc503c69d17d92b3bf9ca7f63a7759077a9b3e50c5bacc3d78bef2b9de45511a785d34d7c4c75870082e0d28fe632c07ac2f131baa853345cb17e6adfac5951862abe62a7e89fc666b6275aa1a26b845f51fb29f8a3764c7d3528e38f39097f5377cbaf9ed74e0d589f47279b
@mortie
mortie / chrono-cheat-sheet.md
Last active January 15, 2026 20:33
std::chrono cheat sheet for the every-day programmer

Chrono cheat sheet

For the every-day programmer who needs to get shit done instead of fighting type errors.

If your application deals with times in any meaningful way, you should probably want to actually store time_points and durations and what-not; chrono has a pretty rich vocabulary for talking about time-related concepts using the type system. However, sometimes you just need to do something simple, like timing how long something takes, which is where chrono becomes overly complex, hence this cheat sheet.

All examples will assume #include <chrono>.

I just want to time something, then print the result